﻿using Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BLL
{
    public class Bll
    {
        static public List<Book> select_over() 
        {
            return DAL.Dal.select_over();
        }

        static public List<Book> books_typeid_top4(int id) 
        {
            return DAL.Dal.books_typeid_top4(id);
        }

        static public List<Book> books_typeid(int id)
        {
            return DAL.Dal.books_typeid(id);
        }

        static public Book book_id(int id) 
        {
            return DAL.Dal.book_id(id);
        }

        static public List<Book> select_key(string key) 
        {
            return DAL.Dal.select_key(key);
        }

        static public List<Ping> select_ping(int bookid) 
        {
            return DAL.Dal.select_ping(bookid);
        }

        static public bool insert_ping(int bookid, int userid, string ping, string dt)
        {
            return DAL.Dal.insert_ping(bookid, userid, ping, dt);
        }

        static public bool insert_order(int id, string orderid, string dt) 
        {
            return DAL.Dal.insert_order(id, orderid, dt);
        }

        static public bool insert_order_det(string orderid, decimal price, int bookid) 
        {
            return DAL.Dal.insert_order_det(orderid,price,bookid);
        }

        static public bool insert_shou(int bookid, int userid) 
        {
            return DAL.Dal.insert_shou(bookid, userid);
        }

        static public List<Book> select_shou(int userid)
        {
            return DAL.Dal.select_shou(userid);
        }

        static public bool delete_shou(int bookid, int userid)
        {
            return DAL.Dal.delete_shou(bookid, userid);
        }

        static public List<Order> order_book(int userid)
        {
            return DAL.Dal.order_book(userid);
        }

        static public List<Book> select_mybook(int userid)
        {
            return DAL.Dal.select_mybook(userid);
        }

        static public bool update(int id, string Author, string bookname, string Press, string price, string Introduced)
        {
            return DAL.Dal.update(id, Author, bookname, Press, price, Introduced);
        }

        static public bool delete(int id ,int show)
        {
            return DAL.Dal.delete(id, show);
        }

        static public List<type> select_type()
        {
            return DAL.Dal.select_type();
        }
    }
}
